package config

import (
	"net"
	"strconv"

	"databasex"
	"databasex/dbx"
)

var ClickHouseHost = databasex.ServerConfig.Host

// "clickhouse://default@127.0.0.1/default?client_info_product[my-app]=0.1")

const (
	ClickHouseUser     = "default"
	ClickHousePassword = "password"
	ClickHousePort     = 9001
)

var ClickHouseConfig = dbx.ClickHouse{
	DataBase: dbx.ClickHouseSet{
		DataBase: databasex.ServerConfig.Database,
		UserName: ClickHouseUser,
		Password: ClickHousePassword,
		Addrs:    []string{net.JoinHostPort(databasex.ServerConfig.Host, strconv.Itoa(ClickHousePort))},
	},
	TLS: dbx.TLS{},
}
